package com.imau.brand.controller;

import com.imau.brand.service.BrandService;
import com.imau.brand.service.impl.BrandServiceImpl;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
// /brand/add

/**
 * 1. 改变请求路径，前缀固定 代表业务名称  后缀操作：add delete edit list find getinfo  /brand/*  /student/*  /user/*
 * 2. 对应到方法
 * 3. 写一个Servlet 控制器中
 */
@WebServlet("/brand/*")
public class BrandController extends HttpServlet {

    /**初始化业务层对象*/
    private BrandService brandService = new BrandServiceImpl();
    protected void list(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }
    protected void add(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void edit(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void delete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }


    protected void deleteBatch(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    protected void find(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }


    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

    }

    @Override
    protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        this.doGet(req,resp);
    }
}
